﻿
// Load in the Google Maps API version 2
google.load("maps", "2.x");

// Wire up the event handlers on the client side
google.setOnLoadCallback(initializeGoogleMap);


// Initialise the Google Map control on the page
function initializeGoogleMap() {
    var map = new google.maps.Map2(document.getElementById("googleMapPanel"));
    var initialCentreLatLng = new google.maps.LatLng(51.665329, -0.402246);
    map.setCenter(initialCentreLatLng, 13);

    // Add some controls to the map
    map.addControl(new google.maps.MapTypeControl());



}

Ext.onReady(function() {

    Ext.state.Manager.setProvider(new Ext.state.CookieProvider());

    var viewport = new Ext.Viewport({
        layout: 'border',
        items: [
					new Ext.BoxComponent({ // raw
					    region: 'north',
					    el: 'north',
					    height: 100
					}), {
					    region: 'west',
					    id: 'west-panel',
					    title: 'Information',
					    split: true,
					    width: 200,
					    minSize: 175,
					    maxSize: 400,
					    collapsible: true,
					    margins: '0 0 0 5',
					    layout: 'accordion',
					    layoutConfig: {
					        animate: true
					    },
					    items: [{
					        contentEl: 'west',
					        title: 'Navigation',
					        border: false,
					        iconCls: 'nav'
					    }, {
					        title: 'Copyright',
					        contentEl: 'copyright',
					        border: false,
					        iconCls: 'copyright'
}]
					    },
					new Ext.TabPanel({
					    region: 'center',
					    deferredRender: false,
					    activeTab: 0,
					    items: [{
					        contentEl: 'centrePanel',
					        title: 'The Borough of Watford',
					        autoScroll: true
}]
					    })
				 ]
    });

    //Put any other code that needs to execute on document ready

});

    	
		